package AddonsSheepContoller.Utils;

import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.digest.DigestUtils;

abstract public class EncryptionAlgorithm {
    public static String md5(String orgText, String processKey) { return DigestUtils.md5Hex(orgText + processKey); }
    public static String md5(String orgText) { return DigestUtils.md5Hex(orgText); }
    public static String sha1(String orgText, String processKey) { return DigestUtils.sha1Hex(orgText + processKey); }
    public static String sha1(String orgText) { return DigestUtils.sha1Hex(orgText); }
    public static String base64I(String orgText) { return Base64.encodeBase64String(orgText.getBytes()); }
    public static String base64O(String base64Byte) { return new String(Base64.decodeBase64(base64Byte)); }
}
